package com.zeta.eduservice.controller.file;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import com.zeta.commonutils.R;
import com.zeta.eduservice.entity.vo.QuestionUploadVo;
import com.zeta.eduservice.entity.vo.WordUploadInfo;
import com.zeta.eduservice.service.QuestionFileService;

@CrossOrigin
@RestController
@RequestMapping("/eduservice/edu_upload_word")
public class EduWordFileUpload {

	@Autowired
	private QuestionFileService fileService;
	@PostMapping("userWordUpload")
	public R userUpload(MultipartFile file,HttpServletRequest request,QuestionUploadVo currChapterId) throws IOException {
		fileService.userWordload(file, request,currChapterId);
	
		//获取文件原名称
		return R.ok();
		
	}
}
